interface CreateIntercityOrderAPIResData {
  code: number
  msg: string
  time: string
  data: string
}

export interface CreateIntercityOrderAPIParams {
  type: string
  id: string
  num: string
  passengers_mobile: string
  passengers_name: string
  start_time: string
  goods_type?: string
  images?: string
  remark?: string
  real_start_place: string
  real_end_place: string
}

export function createIntercityOrderAPI(params: CreateIntercityOrderAPIParams, token: string) {
  return httpInstance.get<CreateIntercityOrderAPIResData, CreateIntercityOrderAPIParams>(
    '/api/intercity/createorder',
    { params, headers: { token } },
  )
}
